package com.axdoc.wallet.dao;

import java.sql.Timestamp;
import java.util.List;

import com.axdoc.wallet.entity.PatientActivitySubWallet;
import com.axdoc.wallet.entity.PatientActivitySubWalletRecords;
import com.axdoc.wallet.entity.PatientBalanceSubWallet;
import com.axdoc.wallet.entity.PatientBalanceSubWalletRecords;
import com.axdoc.wallet.entity.PatientCouponSubWallet;
import com.axdoc.wallet.entity.PatientCouponSubWalletRecords;
import com.axdoc.wallet.entity.PatientVipSubWallet;
import com.axdoc.wallet.entity.PatientVipSubWalletRecords;
import com.axdoc.wallet.entity.PatientWallet;

/**
 * 患者账户
 * 
 * @author sunzhaoli
 *
 */
public interface IPatientWalletDao {
	/**
	 * 添加患者账户
	 * 
	 * @param patientWallet
	 * @return
	 */
	public boolean addPatientWallet(PatientWallet patientWallet);

	/**
	 * 添加患者余额子账户
	 * 
	 * @param patientBalanceSubWallet
	 * @return
	 */
	public boolean addPatientBalanceSubWallet(PatientBalanceSubWallet patientBalanceSubWallet);

	/**
	 * 添加患者活动子账户
	 * 
	 * @param patientActivitySubWallet
	 * @return
	 */
	public boolean addPatientActivitySubWallet(PatientActivitySubWallet patientActivitySubWallet);

	/**
	 * 添加患者券子账户
	 * 
	 * @param patientCouponSubWallet
	 * @return
	 */
	public boolean addPatientCouponSubWallet(PatientCouponSubWallet patientCouponSubWallet);

	/**
	 * 添加患者vip子账户
	 * 
	 * @param patientVipSubWallet
	 * @return
	 */
	public boolean addPatientVipSubWallet(PatientVipSubWallet patientVipSubWallet);

	/**
	 * 根据aid查询患者账户信息
	 * 
	 * @param aid
	 * @return
	 */
	public PatientWallet queryPatientWalletByAid(String aid);

	/**
	 * 根据aid查询患者余额子账户信息
	 * 
	 * @param aid
	 * @return
	 */
	public PatientBalanceSubWallet queryPatientBalanceSubWalletByAid(String aid);

	/**
	 * 根据aid查询患者活动子账户信息
	 * 
	 * @param aid
	 * @return
	 */
	public PatientActivitySubWallet queryPatientActivitySubWalletByAid(String aid);

	/**
	 * 根据aid查询患者券子账户信息
	 * 
	 * @param aid
	 * @return
	 */
	public PatientCouponSubWallet queryPatientCouponSubWalletByAid(String aid);

	/**
	 * 根据aid查询患者vip子账户信息
	 * 
	 * @param aid
	 * @return
	 */
	public PatientVipSubWallet queryPatientVipSubWalletByAid(String aid);

	/**
	 * 修改患者余额子账户信息
	 * 
	 * @param patientBalanceSubWallet
	 * @return
	 */
	public boolean updatePatientBalanceSubWallet(PatientBalanceSubWallet patientBalanceSubWallet);

	/**
	 * 修改患者活动子账户信息
	 * 
	 * @param patientActivitySubWallet
	 * @return
	 */
	public boolean updatePatientActivitySubWallet(PatientActivitySubWallet patientActivitySubWallet);

	/**
	 * 修改患者券子账户信息
	 * 
	 * @param patientCouponSubWallet
	 * @return
	 */
	public boolean updatePatientCouponSubWallet(PatientCouponSubWallet patientCouponSubWallet);

	/**
	 * 修改患者vip子账户信息
	 * 
	 * @param patientVipSubWallet
	 * @return
	 */
	public boolean updatePatientVipSubWallet(PatientVipSubWallet patientVipSubWallet);

	/**
	 * 添加患者余额子账户流水
	 * 
	 * @param balance
	 * @return
	 */
	public boolean addBalanceRecords(PatientBalanceSubWalletRecords balance);

	/**
	 * 添加患者券子账户流水
	 * 
	 * @param coupon
	 * @return
	 */
	public boolean addCouponRecords(PatientCouponSubWalletRecords coupon);

	/**
	 * 添加患者vip子账户流水
	 * 
	 * @param vip
	 * @return
	 */
	public boolean addVipRecords(PatientVipSubWalletRecords vip);

	/**
	 * 添加患者活动子账户流水
	 * 
	 * @param activity
	 * @return
	 */
	public boolean addActivityRecords(PatientActivitySubWalletRecords activity);

	/**
	 * 查询患者余额子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @return
	 */
	public List<PatientBalanceSubWalletRecords> queryBalanceRecords(String tradeNo, Timestamp startTime,
			Timestamp endTime);

	/**
	 * 查询患者券子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @return
	 */
	public List<PatientCouponSubWalletRecords> queryCouponRecords(String tradeNo, Timestamp startTime,
			Timestamp endTime);

	/**
	 * 查询患者活动子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @return
	 */
	public List<PatientActivitySubWalletRecords> queryActivityRecords(String tradeNo, Timestamp startTime,
			Timestamp endTime);

	/**
	 * 查询患者vip子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @return
	 */
	public List<PatientVipSubWalletRecords> queryVipRecords(String tradeNo, Timestamp startTime, Timestamp endTime);
	/**
	 * 修改金额
	 * 
	 * @param id
	 * @param balance
	 * @return
	 */
	public boolean updateBalanceById(int id, int balance);
}
